<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\Collection
 *
 * @property int $id
 * @property int|null $video_id 影视id
 * @property int|null $user_id 用户id
 * @property \Illuminate\Support\Carbon|null $created_at 创建时间
 * @property \Illuminate\Support\Carbon|null $updated_at 编辑时间
 * @property-read \App\Models\User|null $user_nickname
 * @property-read \App\Models\Video|null $video_name
 * @method static \Illuminate\Database\Eloquent\Builder|Collection newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|Collection newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|Collection query()
 * @method static \Illuminate\Database\Eloquent\Builder|Collection whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Collection whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Collection whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Collection whereUserId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|Collection whereVideoId($value)
 * @mixin \Eloquent
 */
class Collection extends Model
{
    //
    protected  $table = 'video_collection';


    public function video_name()
    {
        return $this->hasOne('App\Models\Video','id','video_id');
    }
    public function user_nickname()
    {
        return $this->hasOne('App\Models\User','id','user_id');
    }


}
